package streaming

import com.alibaba.fastjson.JSON
import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession
import org.apache.spark.streaming.kafka.KafkaUtils
import org.apache.spark.streaming.{Seconds, StreamingContext}
import streaming.ReceiverTest.order

object Demo2 {
  def main(args: Array[String]): Unit = {
    val spark = SparkSession.builder().appName("rdd2DF")
      .enableHiveSupport().getOrCreate()
    val df = spark.sql("select * from default.orders limit 100")
    df.show()

  }
}
